Sage: Unified Hybrid Checking for First-Class Types, General Refinement Types, and Dynamic (Extended Report)

نویسندگان

  • Kenneth Knowles
  • Aaron Tomb
  • Jessica Gronski
  • Stephen N. Freund
  • Cormac Flanagan
چکیده

This paper presents Sage, a functional programming language with a rich type system that supports a broad range of typing paradigms, from dynamically-typed Scheme-like programming, to decidable ML-like types, to precise refinement types. This type system is a synthesis of three general concepts — first-class types, general refinement types, and the type Dynamic — that add expressive power in orthogonal and complementary ways. None of these concepts are statically decidable. The Sage compiler uniformly circumvents this limitation using hybrid type checking, which inserts occasional run-time casts in particularly complicated situations that cannot be statically checked. We describe a prototype implementation of Sage and preliminary experimental results showing that most or all types are enforced via static type checking — the number of compiler-inserted casts is very small or zero on all our benchmarks.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Executable Refinement Types

Executable Refinement Types by Kenneth L. Knowles Precise specifications are integral to effective programming practice. Existing specification disciplines such as structural type systems, dynamic contracts, and extended static checking all suffer from limitations such as imprecision, false positives, false negatives, or excessive manual proof burden. New ways of expressing and enforcing progra...

متن کامل

Sage: Hybrid Checking for Flexible Specifications

Software systems typically contain large APIs that are informally specified and hence easily misused. This paper presents the Sage programming language, which is designed to enforce precise interface specifications in a flexible manner. The Sage type system uses a synthesis of the type Dynamic, first-class types, and arbitrary refinement types. Since type checking for this expressive language i...

متن کامل

Formalizing Simple Refinement Types in Coq An Experience Report

We consider refinement types in which base types can be refined by constraints expressible in some decidable logic. Such refinement types have been applied in many settings, such as certification of security policies [1, 10], and reasoning precisely about heap updates [9, 10]. A lot of work has been done on extensions of the basic idea of refinements, including inference in liquid types [8], or...

متن کامل

Hybrid Types, Invariants, and Refinements For Imperative Objects

To control the complexity of large object-oriented systems, objects should communicate via precisely-specified interfaces. Static type checking catches many interface violations early in the development cycle, but decidability limitations preclude checking all desired properties statically. In contrast, dynamic checking supports expressive specifications but may miss errors on execution paths t...

متن کامل

Cut - offs and Automata in Formal Verification of Infinite - State Systems Habilitation

In this habilitation thesis, we discuss two complementary approaches to formal verification of infinite-state systems—namely, the use cut-offs and automata-based symbolic model checking (especially the so-called regular model checking). The thesis is based on extended versions of multiple conference and journal papers joint into a unified framework and accompanied with a significantly extended ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2006